<html>
<head><meta charset="utf-8"><title>syntax highlighting · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html">syntax highlighting</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="189222780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/189222780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#189222780">(Feb 27 2020 at 15:21)</a>:</h4>
<p><span class="user-mention" data-user-id="129457">@Florian Diebold</span> you might like this:</p>
<p><a href="/user_uploads/4715/__b2QTxXGIYg5GT6OiFxBvWQ/image.png" target="_blank" title="image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/__b2QTxXGIYg5GT6OiFxBvWQ/image.png" target="_blank" title="image.png"><img src="/user_uploads/4715/__b2QTxXGIYg5GT6OiFxBvWQ/image.png"></a></div>



<a name="189223276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/189223276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#189223276">(Feb 27 2020 at 15:27)</a>:</h4>
<p><span aria-label="smiley" class="emoji emoji-1f603" role="img" title="smiley">:smiley:</span></p>



<a name="189223388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/189223388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#189223388">(Feb 27 2020 at 15:28)</a>:</h4>
<p>Lol, it's even recursive. Didn't expect that</p>



<a name="189223392"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/189223392" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#189223392">(Feb 27 2020 at 15:28)</a>:</h4>
<p><a href="/user_uploads/4715/cXUeqd0lMBw2xY64iySLdokm/image.png" target="_blank" title="image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/cXUeqd0lMBw2xY64iySLdokm/image.png" target="_blank" title="image.png"><img src="/user_uploads/4715/cXUeqd0lMBw2xY64iySLdokm/image.png"></a></div>



<a name="189223490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/189223490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Edwin Cheng <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#189223490">(Feb 27 2020 at 15:29)</a>:</h4>
<p>That's awesome !</p>



<a name="189226312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/189226312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#189226312">(Feb 27 2020 at 15:57)</a>:</h4>
<p>Does it highlight the code inside of string literals?</p>



<a name="189226411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/189226411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#189226411">(Feb 27 2020 at 15:58)</a>:</h4>
<p>yup, if the literal is a an argument to the function, whose corresponding parameter is named <code>ra_fixture</code></p>



<a name="189226769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/189226769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#189226769">(Feb 27 2020 at 16:01)</a>:</h4>
<p>Hmm, I wish we could make it more general.<br>
I know that vscode detects quasi quotation with TypeScript (JavaScript) <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals" target="_blank" title="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals">tag functions</a>:<br>
<a href="/user_uploads/4715/ekDWH7D4QEXeWF5T00VUtfe7/image.png" target="_blank" title="image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/ekDWH7D4QEXeWF5T00VUtfe7/image.png" target="_blank" title="image.png"><img src="/user_uploads/4715/ekDWH7D4QEXeWF5T00VUtfe7/image.png"></a></div>



<a name="189226954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/189226954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#189226954">(Feb 27 2020 at 16:03)</a>:</h4>
<p>We could kinda reserve the special number of hashes <code>#</code>, e.g. 3 of them to denote a rust source code string literal</p>



<a name="189227201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/189227201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#189227201">(Feb 27 2020 at 16:05)</a>:</h4>
<p>we'll use attrs once they are stable: <a href="https://github.com/rust-analyzer/rust-analyzer/pull/3349#issuecomment-592022476" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/pull/3349#issuecomment-592022476">https://github.com/rust-analyzer/rust-analyzer/pull/3349#issuecomment-592022476</a></p>



<a name="189228100"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/189228100" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#189228100">(Feb 27 2020 at 16:14)</a>:</h4>
<p>Hmm, yeah really, that's a nice application of the attributes!</p>



<a name="189234433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/189234433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#189234433">(Feb 27 2020 at 17:20)</a>:</h4>
<p><code>ra_fixture::code(r#"..."#)</code> <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="189234665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/189234665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#189234665">(Feb 27 2020 at 17:23)</a>:</h4>
<p>But I think the current solution is fine. Nobody will know.</p>



<a name="189237404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/189237404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#189237404">(Feb 27 2020 at 17:52)</a>:</h4>
<p>Easter egg)</p>



<a name="189237725"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/189237725" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#189237725">(Feb 27 2020 at 17:55)</a>:</h4>
<p>there's one intentional Easter egg in rust-analyzer....</p>



<a name="189239069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/189239069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#189239069">(Feb 27 2020 at 18:08)</a>:</h4>
<p>Hmm, gonna read all da code to find it!</p>



<a name="189247974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/189247974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#189247974">(Feb 27 2020 at 19:31)</a>:</h4>
<p>Does <a href="https://github.com/rust-analyzer/rust-analyzer/blame/master/docs/dev/README.md#L137" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/blame/master/docs/dev/README.md#L137">the following</a> still work, <span class="user-mention" data-user-id="133169">@matklad</span> ?</p>
<div class="codehilite"><pre><span></span>env RUST_LOG=gen_lsp_server=trace code .
</pre></div>


<p>I would like to enable <code>trace</code> logging for <code>Run extension</code> debug configurations in VSCode...</p>



<a name="189266976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/189266976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#189266976">(Feb 27 2020 at 23:02)</a>:</h4>
<p><code>rust-analyzer.trace.server = verbose</code> is better</p>



<a name="195747771"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/195747771" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Coenen Benjamin <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#195747771">(Apr 29 2020 at 18:02)</a>:</h4>
<p>Hi all I'm currently trying to debug this issue <a href="https://github.com/rust-analyzer/rust-analyzer/issues/4202" title="https://github.com/rust-analyzer/rust-analyzer/issues/4202">https://github.com/rust-analyzer/rust-analyzer/issues/4202</a> but when I inspect with vscode I don't have the part about semantic token type. I think it's because I don't really use rust-analyzer for my syntax highlighting ? Can you give me a tips to enable this kind of view with the syntax highlighting coming from ra ?</p>



<a name="195748284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/195748284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Coenen Benjamin <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#195748284">(Apr 29 2020 at 18:06)</a>:</h4>
<p>Sorry for the noise I find the solution. I just had to select a default theme (dark +) for example</p>



<a name="195806839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/195806839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#195806839">(Apr 30 2020 at 07:39)</a>:</h4>
<p>do you have <code>editor.semanticTokens = true;</code> or something like that in settings.json?</p>



<a name="195806842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/195806842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#195806842">(Apr 30 2020 at 07:39)</a>:</h4>
<p>I thin it is required to enable highlighting</p>



<a name="195807094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/195807094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#195807094">(Apr 30 2020 at 07:43)</a>:</h4>
<p>I think it's enabled by default now -- it was the theme.</p>



<a name="196813581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/196813581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Igor Matuszewski <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#196813581">(May 07 2020 at 18:41)</a>:</h4>
<p>I'd just like to say kudos for implementing it in the rust-analyzer - I believe that's the feature I missed most in the IDE environment. Just switching to rust-analyzer in the extension makes a big difference and I'm excited for the feature <span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span></p>



<a name="196824365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/syntax%20highlighting/near/196824365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jeremy Kolb <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/syntax.20highlighting.html#196824365">(May 07 2020 at 20:11)</a>:</h4>
<p>This is so much faster in today's vscode release</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>